import random
a={'web':1,'java':2,'python':3,'javascript':4}
print(a['python'])
for i in a:
    print(i,a[i])
list1=[1,2,3,4,5,6,7,8,9]
list2=[0,2,3,4,5,6,7,8,9]
z=dict(zip(list1,list2))
print(z)
l=list(z.items())
print(l)
dl=dict(l)
print(dl)
dl.pop(1)
print(dl)
print(dl.popitem())
print(dl)
d=dict(cat=1,dog=2)
print(d)
t=(1,2,3,4,5,6,7,8,9)
print({t:10})
print(max(d))
print(min(t))
print(d['cat'])
print(d.get('dog'))
print(d.get('j','不存在'))
for key,value in d.items():
    print(key,value)
q={1:'a',2:'b',3:'c'}
q[4]='d'
for key,value in q.items():
    print(key,value)

qw={i :random.randint(1,100) for i in range(5)}
print(qw)
list3=[1,2,3,4,5,6,7,8,9]
list4=[1,2,3,4,5,6,7,8,9]
qw2={key:value for key,value in zip(list3,list4)}
print(qw2)
